// pages/fs-coupon-ad/index.js
const app = getApp();
Page({

    /**
     * 页面的初始数据
     */
    data: {
        haveNavBar: false,
        menuInfo: {
            top: 0,
            height: 30,
        },
        isShareInto: true,
        locName: "fb_ad_loc",
        scrollLeft: "",
        empty: false,
        curTab: 0,
        coupon: [
            {
                category_name: "待领取",
                stocks: [{
                    shop_logo: "http://wx.qlogo.cn/mmhead/Q3auHgzwzM4nplJRZAE0RYqJ0uVw03bAnVreZoaQSEwouvt4UlcYLQ/0",
                    shop_name: "古镇家宴",
                    coupon_logo: "http://wxsnsdythumb.wxs.qq.com/109/20204/snsvideodownload?m=8c94811f4d868669d9ee8b0bad7926c0&filekey=30340201010420301e02016d0402534804108c94811f4d868669d9ee8b0bad7926c0020301d4be040d00000004627466730000000131&hy=SH&storeid=32303139303931393135303434393030303633313062313336666664393336663561333230613030303030303664&bizid=1023",
                    transaction_minimum: 30000,
                    coupon_value: 5000,
                    tag: "满减券",
                    im_type: 1,
                    ustatus: 0,
                    sign: "",
                    merchant: "古镇家宴",
                }]
            },
            {
                category_name: "已领取",
                stocks: [{
                    shop_logo: "http://wx.qlogo.cn/mmhead/Q3auHgzwzM5bplF9vwstbQdlrqUNibdhCOpIbQlicjznEWPuQaMnr9fA/0",
                    shop_name: "大理海东茄子烧烤",
                    coupon_logo: "http://wxsnsdythumb.wxs.qq.com/109/20204/snsvideodownload?m=ae14b44b87afd53d54fa78c52c78fc89&filekey=30340201010420301e02016d040253480410ae14b44b87afd53d54fa78c52c78fc89020302636f040d00000004627466730000000131&hy=SH&storeid=32303139303631343135353630363030303332313133313336666664393336663561333230613030303030303664&bizid=1023",
                    transaction_minimum: 10000,
                    coupon_value: 2000,
                    tag: "满减券",
                    im_type: 2,
                    ustatus: 1,
                    sign: "",
                    merchant: "大理海东茄子烧烤",
                }, {
                    shop_logo: "http://wx.qlogo.cn/mmhead/Q3auHgzwzM5kYNquib6T1Ejsj3xna59EIGFdDAqO5pdlZw9l8ulwsnA/0/0/0",
                    shop_name: "撸串吧音乐烤吧",
                    coupon_logo: "http://wxsnsdythumb.wxs.qq.com/109/20204/snsvideodownload?m=e81470ece31e3b03f64ab1a095125b9b&filekey=30340201010420301e02016d040253480410e81470ece31e3b03f64ab1a095125b9b020303a2ee040d00000004627466730000000131&hy=SH&storeid=32303137313232383031303330373030306564633636313336666664393336663561333230613030303030303664&bizid=1023",
                    transaction_minimum: 30000,
                    coupon_value: 5000,
                    tag: "满减券",
                    im_type: 2,
                    ustatus: 1,
                    sign: "",
                    merchant: "撸串吧音乐烤吧",
                }]
            }
        ],
        slidingDistance: "",
        appId: "",
        homePath: "",
        couponPath: "",
        release: "",
        isIpx: "",
        tname: "",
        myCouponTotal: 2,
        jumpMiniAppInfo: {
            appId: "",
            path: ""
        },
        showMask: false,
        isShowAdPop: true,
        maskCouponList: [{
            coupon_logo: "http://wxsnsdythumb.wxs.qq.com/109/20204/snsvideodownload?m=8c94811f4d868669d9ee8b0bad7926c0&filekey=30340201010420301e02016d0402534804108c94811f4d868669d9ee8b0bad7926c0020301d4be040d00000004627466730000000131&hy=SH&storeid=32303139303931393135303434393030303633313062313336666664393336663561333230613030303030303664&bizid=1023",
            coupon_name: "古镇家宴满减券",
            shop_name: "古镇家宴",
            transaction_minimum: 30000
        }]
    },


    bindChangeTab: function (e) {
        this.setData({
            curTab: e.currentTarget.dataset.id
        })
    },

    bindChangeSwiper: function (e) {
        console.log('e', e.detail);
        this.setData({
            curTab: e.detail.current
        })
    },

    sendCouponCallback: function (e) {
        this.setData({
            showMask: true
        })
    },

    bindCloseMask: function (e) {
        console.log('e', e);
        this.setData({
            showMask: false
        })
    },


    /**
     * 生命周期函数--监听页面加载
     */
    onLoad(options) {

    },

    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady() {
        console.log('555', this.data.pageCouponList);
    },

    /**
     * 生命周期函数--监听页面显示
     */
    onShow() {

    },

    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide() {

    },

    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload() {

    },

    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh() {

    },

    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom() {

    },

    /**
     * 用户点击右上角分享
     */
    onShareAppMessage() {

    }
})